<html>
<head><meta charset="utf-8"><title>Diagnostics reported against HIR · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html">Diagnostics reported against HIR</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164123512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164123512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164123512">(Apr 24 2019 at 21:57)</a>:</h4>
<p>Seems like a stretch, but is there a debug mode in which I can see typechecking errors pointed at a pretty-printed HIR rather than the original source spans? Some desugaring code I wrote is getting type mismatch errors, but it's hard to tell which part of the code they're coming from</p>



<a name="164123817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164123817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164123817">(Apr 24 2019 at 22:01)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span>: I wonder if you could use <code>-Zunpretty=hir</code> and then try compiling the output</p>



<a name="164123965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164123965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164123965">(Apr 24 2019 at 22:03)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> unfortunately that doesn't work</p>



<a name="164123969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164123969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164123969">(Apr 24 2019 at 22:03)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> in my case, the HIR compiles just fine XD</p>



<a name="164124024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164124024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164124024">(Apr 24 2019 at 22:04)</a>:</h4>
<p>so it's some extra bit of metadata I'm setting that's causing it to fail</p>



<a name="164124032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164124032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164124032">(Apr 24 2019 at 22:04)</a>:</h4>
<p>ah :/</p>



<a name="164145573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164145573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164145573">(Apr 25 2019 at 05:50)</a>:</h4>
<p>I would love it if we had something like that.</p>



<a name="164153415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Diagnostics%20reported%20against%20HIR/near/164153415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Diagnostics.20reported.20against.20HIR.html#164153415">(Apr 25 2019 at 08:49)</a>:</h4>
<p>cc <span class="user-group-mention" data-user-group-id="1187">@WG-diagnostics</span> we could probably add a mode where we don't highlight code spans but dump the pretty printed HIR (all levels of expansion even) of whatever span is offending the compiler</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>